home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d7
/
exechk.arc
/
MYPROG.PAS
< prev
Wrap
Pascal/Delphi Source File
|
1990-12-06
|
2KB
|
57 lines
(*******************************************************************
Program/Unit MYPROG.PAS
Written 06 Dec 90
Revised .........
Author Johnathan J. Stein
PO Box 346
Perrysburg, OH 43551
CompuServe 76576,470
Purpose To illustrate how to implement EXE
file "stamping", in order to discourage
illegal copying WITHOUT using copy protection.
Contents
--------
Sample application program, which uses "MyExeCheck" to make sure that
the installation program has been run to "stamp" the user-specific
information onto the EXE file.
Both the installation and application program share data display routines.
*******************************************************************)
USES Crt,
exechk ;
{$I mydata.inc } (* Only need Data Display *)
procedure MyExeCheck ( S : string ) ;
begin
MyDataInit ;
(*******************************************************************
Here is where your program checks for the user-data to be "stamped"
*******************************************************************)
if not IsExePersonalized ( S ) then
begin
writeln ( 'Program must be installed properly!' ) ;
writeln ( 'Please consult your manual.' ) ;
halt ( 1 ) ;
end ;
ExeReadData ( S ,
Data ,
SizeOf ( Data ) ) ; (* Get info from EXE file *)
MyDataOutput ; (* Display user info *)
end ;
procedure MyMainRoutine ;
begin
writeln ( 'My program is running!' ) ;
end ;
begin
(*******************************************************************
NOTE: Under DOS 3.x and higher, the program name is returned by
ParamStr ( 0 ). This is NOT true for prior versions of DOS.
*******************************************************************)
MyExeCheck ( ParamStr ( 0 ) ) ;
FileMode := 2 ; (* Reset to TP default *)
MyMainRoutine ;
end .